﻿@model MAPDavy.WebMVC3.Models.ChangePasswordModel

@{
    ViewBag.Title = "Change Password";
}
@section JavaScript{
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#guardar').click(function () {
                $('form').submit();
            });
        });
    </script>
 }
 <div class="cpanel ui-widget ui-widget-content ui-corner-all">
    <table class="toolbar">
        <tr>
            <td valign="middle" >
                <img src="@Url.Content("~/Content/images/changePwsT.png")" title="Usuarios" alt="Usuarios" />
            </td>
            <td class="tdHeader"><span class="header">Cambiar Password</span></td>
            <td><center>
                <a href="#" id="guardar">
                    <img src="@Url.Content("~/Content/images/save.png")" title="Usuarios" alt="Usuarios" />
                    <br /><span class="label">Guardar</span>
                </a></center>
            </td>
            <td><center>
                <a href="@Url.Action("Index", "Account")">
                    <img src="@Url.Content("~/Content/images/back.png")" title="Candelar" alt="Cancelar" />
                    <br /><span class="label">Cancelar</span>
                </a></center>
            </td>
        </tr>
    </table>
</div>
<p>
    Password minimo requerido es de @Membership.MinRequiredPasswordLength caracteres.
</p>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
        </fieldset>
    </div>
}
